package com.million.orderservice.utils;

import lombok.Data;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * @Author: studyboy
 * @Date: 2022/4/9  23:16
 * 微信支付 属性工具类
 */
@Component
public class VxPayProperties implements InitializingBean {

    @Value("${weixin.pay.appid}")
    private String appId;

    @Value("${weixin.pay.partner}")
    private String partner;

    @Value("${weixin.pay.partnerkey}")
    private String partnerKey;

    @Value("${weixin.pay.notifyurl}")
    private String notifyUrl;

    public static String APP_ID;

    public static String PARTNER;

    public static String PARTNER_KEY;

    public static String NOTIFY_URL;

    @Override
    public void afterPropertiesSet () throws Exception {
        APP_ID = appId;
        PARTNER = partner;
        PARTNER_KEY = partnerKey;
        NOTIFY_URL = notifyUrl;
    }
}
